package com.demo.understandmvc.crossOrigin;

import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class MycrossController {

	// 只允许Origin是http://henan.china.com.cn
	@CrossOrigin(origins = "http://henan.china.com.cn")
	@GetMapping("/myCors")
	public String myCors() {
		return "CORS TEST";
	}

}
